package Try;

import java.util.*;

public class Person {
    @MyAnno
    private String stra;
    private String strb;
    private String strc;

    public Person(String s1,String s2,String s3){
        this.stra = s1;
        this.strb = s2;
        this.strc = s3;
    }

    public static void main(String[] args) {
        List<int[]> list = new ArrayList<>();
        int[][] array = {{2,4},{6,4},{6,7},{2,3}};
//        list.add(array[0]);
//        list.add(array[1]);
//        list.add(array[2]);
//        list.add(array[3]);
        list = Arrays.asList(array);


        Collections.sort(list, new Comparator<int[]>() {
            @Override
            public int compare(int[] o1, int[] o2) {
                return o1[0]-o2[0]>0?o1[0]:o1[1]-o2[1];
//                return o2[0]-o1[0]>0?o2[0]:o2[1]-o1[1];
            }
        });

        for (int i=0;i<list.size();i++){
            for (int j=0;j<list.get(i).length;j++){
                System.out.println(list.get(i)[j]);
            }
        }
    }
}
